package io.qifan.desktop.api.user;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;


@Data
public class UserDto implements Serializable {
    private  Long id;
    private  LocalDateTime createdAt;
    private  LocalDateTime updatedAt;
    private  Integer version;
    @NotBlank(message = "用户名不能为空")
    @Length(min = 2, max = 20, message = "用户名长度介于2-20")
    private  String username;
    @NotBlank(message = "密码不能为空")
    @Length(min = 6, max = 20, message = "密码长度介于6-20")
    private  String password;
}